<template>
    <el-drawer v-model="visible" title="模型属性" direction="rtl" size="30%">
        <div v-if="data">
            <p><strong>名称:</strong> {{ data.name }}</p>
            <el-descriptions :column="1" border>
                <el-descriptions-item v-for="(value, key) in data.properties" :key="key" :label="key">
                    {{ value }}
                </el-descriptions-item>
            </el-descriptions>
        </div>
    </el-drawer>
</template>

<script setup lang="ts">
defineProps<{
    visible: boolean;
    data: { name: string; properties: Record<string, any> } | null;
}>();

defineEmits(['update:visible']);
</script>
